
<!--link href="{{ url_for('static', filename='bootstrap/3_3_4/css/bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='bootstrap/3_3_4/css/dashboard.css') }}" rel="stylesheet"-->
<!--link href="http://cdn.datatables.net/1.10.0/css/jquery.dataTables.css" rel="stylesheet"-->
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='datatable/jquery.dataTables.css') }}" rel="stylesheet">



<div class="panel panel-primary">
      <div class="panel-heading">
        <h3 class="panel-title">用户列表</h3>
      </div>
      <div class="panel-body">

    <table id="example" class="table table-striped">
        <thead>
            <tr>
                 <th>ID</th><th>姓名</th><th>邮箱</th><th>密码</th><th>是否激活</th><th>状态</th><th>注册日期</th><!--th>操作</th-->
             </tr>
         </thead>
         <!--tbody>
        {% for i in data %}
           <tr>
               <td>{{i[0]}}</td><td>{{i[1]}}</td><td>{{i[2]}}</td><td>{{i[3]}}</td><td>
               {% if i[4]==1 %}
               <font color="green">已激活</font>
               {% else %}
               <font color="red">未激活</font>
               {% endif %}

               </td><td>
               {% if i[5]==1 %}
               <font color="green">正常</font>
               {% else %}
               <font color="red">关闭</font>
               {% endif %}
               </td>
               <td>{{i[6]}}
           </tr>
        {% endfor %}
        </tbody-->

     </table>
 </div>
    </div>

<form  action="/page" method="get">
    <input type="hidden" readonly name="count_start" value="{{count_start}}" />
    <input type="hidden" readonly name="count" value="{{count}}" />
    开始：<input type="date"  name="s_time" value="{{s_time}}" />
    结束：<input type="date" name="d_time" value="{{d_time}}" />

    <button type="reset">重置</button>
    <button type="submit">查询</button>
<table class="table table-hover">
    <thead>
            <tr>
                 <th>ID</th><th>姓名</th><th>邮箱</th><th>密码</th><th>是否激活</th><th>状态</th><th>注册日期</th><!--th>操作</th-->
             </tr>
         </thead>
    {% for i in data %}
  <tr>
      <td>{{i[0]}}</td>
      <td>{{i[1]}}</td>
      <td>{{i[2]}}</td>
      <td>{{i[3]}}</td>
      <td>{% if i[4] ==1 %}<font color="green">已激活</font>{% else %}<font color="red">未激活</font>{% endif %}</td>
      <td>{% if i[5] ==1 %}<font color="green">正常</font>{% else %}<font color="red">关闭</font>{% endif %}</td>
      <td>{{i[6]}}</td>
  </tr>
    {% endfor %}
</table>
</form>
<nav>
  <ul class="pagination">
      <li><span>共{{total_count[0][0]}}条记录，分{{total_page}}页，当前第{{count_start}}页</span></li>
      <li class=""><a href="/page?count_start={{count_start-1}}&count={{count}}&s_time={{s_time}}&d_time={{d_time}}" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>
      {% for i in total_list[:] %}
      <li class={{CA[i]}} id={{CA[i]}}><a href="/page?count_start={{i}}&count={{count}}&s_time={{s_time}}&d_time={{d_time}}">{{i}} <span class="sr-only">(current)</span></a></li>
      {% endfor %}
      <!--li><span>......</span></li>
      <li class={{CA[total_list[-1]]}} ><a href="/page/{{total_list[-1]}}">{{total_list[-1]}} <span class="sr-only">(current)</span></a></li-->
      <li class="" id=""><a href="/page?count_start={{count_start+1}}&count={{count}}&s_time={{s_time}}&d_time={{d_time}}" aria-label="Previous" onclick=""><span>&raquo;</span></a></li>
  </ul>
</nav>
<!--script src="https://cdn.datatables.net/1.10.8/js/jquery.dataTables.min.js"></script-->
<script src="{{ url_for('static', filename='bootstrap/3_3_4/js/jquery.js') }}" ></script>
<!--script src="{{ url_for('static', filename='bootstrap/3_3_4/js/bootstrap.min.js') }}"></script-->
<script src="{{ url_for('static', filename='datatable/jquery.dataTables.min.js') }}"></script>
<script type="text/javascript">
    $("#btn1").click(function(){
    alert("Text: " + $("#active").text());
  });
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#example').dataTable({
            "language": {
                "url": "{{ url_for('static', filename='datatable/Chinese.json') }}"
            },
            "processing":true,
            "serverSide":true,
            "ajax":"/page_ajax",
            //"columns":"all"
        });
    });
</script>

